package com.hl.sfzy.service.impl;

import com.hl.sfzy.entity.SysUser;
import com.hl.sfzy.mapper.LoginMapper;
import com.hl.sfzy.service.LoginService;
import com.hl.sfzy.utils.MD5Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author ffc
 * @version 1.0
 * @description: TODO
 * @className: LoginServiceImpl
 * @date 2024/7/15 13:18
 */

@Service
public class LoginServiceImpl implements LoginService {

    @Autowired
    LoginMapper loginMapper;
    @Override
    public SysUser login(SysUser sysUser, Integer source) {
        String encode = MD5Util.encode(sysUser.getUserpwd());
        sysUser.setUserpwd(encode);
        return loginMapper.login(sysUser,source);
    }

}
